import request from '@/utils/request'

// 获取报价单列表
export function getQuotationList(params) {
  return request({
    url: '/quotations',
    method: 'get',
    params
  })
}

// 获取报价单详情
export function getQuotationDetail(id) {
  return request({
    url: `/quotations/${id}`,
    method: 'get'
  })
}

// 创建报价单
export function createQuotation(data) {
  return request({
    url: '/quotations',
    method: 'post',
    data
  })
}

// 更新报价单
export function updateQuotation(id, data) {
  return request({
    url: `/quotations/${id}`,
    method: 'put',
    data
  })
}

// 删除报价单
export function deleteQuotation(id) {
  return request({
    url: `/quotations/${id}`,
    method: 'delete'
  })
}

// 提交报价单
export function submitQuotation(id) {
  return request({
    url: `/quotations/${id}/submit`,
    method: 'post'
  })
}

// 生成合同
export function generateContract(id) {
  return request({
    url: `/quotations/${id}/generate-contract`,
    method: 'post'
  })
}

// 获取枚举选项
export function getQuotationEnums() {
  return request({
    url: '/quotations/enums',
    method: 'get'
  })
} 